<template>
	<view class="container">
		<!-- 小程序头部兼容 -->
		<!-- #ifdef MP -->
		<view class="mp-search-box">
			<input class="ser-input" type="text"  placeholder="输入关键字搜索" @input="handleInput"  @confirm="navToSearch" />
		</view>
		<!-- #endif -->
		
		<!-- 头部轮播 -->
		<view class="carousel-section"> 
			<!-- 标题栏和状态栏占位符 -->
			<!-- <view class="titleNview-placing"></view> -->
			<!-- 背景色区域 -->
			<!-- <view class="titleNview-background" :style="{backgroundColor:titleNViewBackground}"></view> -->
			<swiper class="carousel" circular="true" @change="swiperChange" indicator-dots="true" autoplay="autoplay" :interval="interval"
			 :duration="duration">
				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item" @click="navToDetailPage1(item)">
					<image :src="img+item.THUMB" class="swiper-img" mode="aspectFill" />
				</swiper-item>
			</swiper>
		</view>
		<!-- 分类 -->
		<view class="cate-section1">
			<view class="cate-item" @click="navToGroupBuyPage()">
				<image src="/static/temp/team.png"></image>
				<text>团购</text>
			</view>
			<!-- #ifndef MP-WEIXIN -->
			<view class="cate-item" @click="navToNewproductPage()">
				<image src="/static/temp/best.png"></image>
				<text>优选</text>
			</view>
			<!-- #endif -->
			<view class="cate-item" @click="navToBestPage()">
				<image src="/static/temp/exchange.png"></image>
				<text>兑换</text>
			</view>
			<view class="cate-item" @click="navToTehuiPage()">
				<image src="/static/temp/prebuy.png"></image>
				<text>预购</text>
			</view>
			<view class="cate-item" @click="navToSeckillPage()">
				<image src="/static/temp/spike.png"></image>
				<text>秒杀</text>
			</view>
		</view>
		<!-- 动态文字 -->
		<view class="uni-swiper-msg">
			<view class="uni-swiper-msg-icon un-yticon">
				<uni-icons type="sound" color="#FF0000" size="20" ></uni-icons>
			</view>
			<swiper vertical="true" autoplay="true" circular="true" interval="3000">
				<swiper-item v-for="(item, index) in newsList" :key="index">
					<navigator class="un-gun">{{item.DESCRIBE}}</navigator>
					<text class="un-xiang" @click="navToNewsDetailPage(item)">详情</text>
				</swiper-item>
			</swiper>
		</view>


		<!-- 品牌直供 -->
		<!-- <view class="f-header m-t" @click="navToBrandPage()">
			<view class="tit-box">
				<text class="tit">品牌直供</text>
			</view>
			<text class="tit2">更多推荐</text>
			<text class="iconfont1 iconfont  icon-you1"></text>
		</view> -->
		<!-- <view class="brand-section">
			<view 
				v-for="(item, index) in brandList" :key="index"
				class="guess-item"
				@click="navToDetailPage(item)"
			>
				<text class="title clamp">{{item.brand}}</text>
				<text class="price">{{item.price}}元起</text>
				<view class="un-huangtuoyuan">
					<text >上新</text>
				</view>
				<view class="image-wrapper">
					<image :src="item.image" mode="aspectFill"></image>
				</view>
			</view>
		</view> -->

		<!-- 秒杀楼层 -->
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToseckillPage()">
				<view class="tit-box">
					<text class="tit">秒杀专区</text>
				</view>
				<text class="tit2 un-you">本场结束剩余</text>
			</view>
			<view class="s-header m-t" @click="navToseckillPage()">
				<view class="tit-box">
					<text class="tit2">下一场 {{time*2+2}}:00 开始</text>
				</view>
				<view class="un-you2" >
					<uni-countdown :day="0" :hour="hour" :minute="minute" :second="second" color="#FFFFFF" background-color="#3C3C3C"
					 border-color="#3C3C3C" :showDay="false" @timeup="timeup" v-if="dao" />
				</view>
			</view>
			<view class="un-seckill-section" v-if="spikeList.length!=0" >
		
				<view  v-for="(item, index) in spikeList" :key="index" class="guess-item" @click="navToDetailPagespike(item)">
					<view style="position: relative;" v-if="index<6">
						<!-- <view class="un-hongyuan">
							<text class="m-price">￥{{item.SELLPRICE}}</text>
						</view> -->
		
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
					</view>
					<view class="title clamp">{{item.NAME}}</view>
					<view class="tit2 title2 clamp">{{item.SHORTINFO}}</view>
					<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
						<view class="price">
							<text class="price-a">￥</text>
							<text class="price-b">{{item.SPIKEPRICE}}</text>
						</view>
						<text class="un-rentit2 title2">已售{{item.SALECOUNT}}</text>
					</view>
					
					<view class="m-price">
						<text class="price-a">￥</text>
						<text>{{item.SELLPRICE}}</text>
					</view>
				</view>
			</view>
		</view>
			


		<!-- 团购专区 -->
		
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToGroupBuyPage()">
				<view class="tit-box">
					<text class="tit">团购专区</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			
			<view class="un-seckill-section" v-if="gbList.length!=0">
				<view  v-for="(item, index) in gbList" :key="index" class="guess-item" @click="navToDetailPageGb(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<text class="price">￥{{item.GBPRICE}}</text>
							<text class="un-rentit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		

		
		<!-- 综合商品 -->
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToNewproductPage()">
				<view class="tit-box">
					<text class="tit">综合商品</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<view class="un-seckill-section" v-if="freshList.length!=0">
				<view  v-for="(item, index) in freshList" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<text class="price">￥{{item.SALEPRICE}}</text>
							<text class="un-rentit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		
		<!-- <view class="new-section m-t">
			<view class="s-header m-t" @click="navToNewproductPage()">
				<view class="tit-box">
					<text class="tit">综合商品</text>
				</view>
				<text class="tit2">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<scroll-view class="floor-list" scroll-x>
				<view class="scoll-wrapper"> -->
					<!-- 空白页 -->
					<!-- <view v-if="freshList.length===0" class="empty">
						<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
						<view class="empty-tips">暂无数据</view>
					</view>

					<view v-else v-for="(item, index) in freshList" :key="index" class="floor-item" @click="navToDetailPage2(item)">
						<view>
							<view class="un-huangtuoyuan">
								<text> 新品</text>
							</view>
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>

						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<text class="price" v-if="!item.MULTIPAY">¥{{item.SALEPRICE}}</text>

						<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>

						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">{{item.MUCHSELLERPRICE}}元</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
					</view>
					<view v-if="freshList.length!==0" class="more" @click="navToNewproductPage()">
						<text>查看全部</text>
						<text>More+</text>
					</view>
				</view>

			</scroll-view>

		</view> -->
		<!-- 旅游专区 -->
		
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToTravelPage()">
				<view class="tit-box">
					<text class="tit">旅游专区</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<view class="un-seckill-section" v-if="travelList.length!=0">
				<view  v-for="(item, index) in travelList" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<view style="line-height: 40upx;">
								<text class="price" v-if="!item.MULTIPAY">特惠价：¥{{item.SALEPRICE}}</text>
								
								<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
								
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">¥{{item.MUCHSELLERPRICE}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
							</view>
							<text class="tit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		
		
		
		
		
		<!-- <view class="new-section m-t">
			<view class="s-header m-t" @click="navToGroupBuyPage()">
				<view class="tit-box">
					<text class="tit">团购专区</text>
				</view>
				<text class="tit2">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<scroll-view class="floor-list" scroll-x>
				<view class="scoll-wrapper">
					<view v-if="gbList.length===0" class="empty">
						<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
						<view class="empty-tips">暂无数据</view>
					</view>
		
					<view v-else v-for="(item, index) in gbList" :key="index" class="floor-item" @click="navToDetailPageGb(item)">
						<view>
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
		
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<text class="price" >¥{{item.GBPRICE}}</text>
					</view>
					<view v-if="gbList.length!==0" class="more" @click="navToGroupBuyPage()">
						<text>查看全部</text>
						<text>More+</text>
					</view>
				</view>
		
			</scroll-view>
		
		</view> -->
		
		
		<!-- 扶贫专区 -->
		
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToPovertyPage()">
				<view class="tit-box">
					<text class="tit">扶贫专区</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			
			<view class="un-seckill-section" v-if="povertyList.length!=0">
				<view  v-for="(item, index) in povertyList" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<view style="line-height: 40upx;">
								<text class="price" v-if="!item.MULTIPAY">特惠价：¥{{item.SALEPRICE}}</text>
								
								<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
								
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">¥{{item.MUCHSELLERPRICE}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
							</view>
							<text class="tit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		
		<!-- <view class="new-section m-t">
			<view class="s-header m-t" @click="navToPovertyPage()">
				<view class="tit-box">
					<text class="tit">扶贫专区</text>
				</view>
				<text class="tit2">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<scroll-view class="floor-list" scroll-x>
				<view class="scoll-wrapper">
					<view v-if="povertyList.length===0" class="empty">
						<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
						<view class="empty-tips">暂无数据</view>
					</view>
		
					<view v-else v-for="(item, index) in povertyList" :key="index" class="floor-item" @click="navToDetailPage2(item)">
						<view>
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
		
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<text class="price" v-if="!item.MULTIPAY">¥{{item.SALEPRICE}}</text>
		
						<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
		
						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">{{item.MUCHSELLERPRICE}}元</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
					</view>
					<view v-if="povertyList.length!==0" class="more" @click="navToPovertyPage()">
						<text>查看全部</text>
						<text>More+</text>
					</view>
				</view>
		
			</scroll-view>
		
		</view> -->
		
		<!-- 专题精选 -->
		
		<view class="seckill-section m-t">
			
			<view class="s-header m-t" @click="navToSpecialPage()">
				<view class="tit-box">
					<text class="tit">专题精选</text>
				</view>
				<text class="tit3">更多专题</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			
			<view class="un-seckill-section" v-if="popList.length!=0" >
				<view  v-for="(item, index) in popList" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<view style="line-height: 40upx;">
								<text class="price" v-if="!item.MULTIPAY">特惠价：¥{{item.SALEPRICE}}</text>
								
								<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
								
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">¥{{item.MUCHSELLERPRICE}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
							</view>
							<text class="tit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		
		<!-- <view class="f-header m-t" @click="navToSpecialPage()">
			<view class="tit-box">
				<text class="tit">专题精选</text>
			</view>
			<text class="tit2">更多专题</text>
			<text class="iconfont1 iconfont  icon-you1"></text>
		</view> -->

		<!-- 空白页 -->
		<!-- <view v-if="popList.length===0" class="empty"  >
			<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
			<view class="empty-tips">暂无数据</view>
		</view>
		<view v-else class="zhuan-section">
			<swiper class="g-swiper" :duration="500">
				<swiper-item class="g-swiper-item" v-for="(item, index) in popList" :key="index" @click="navToDetailPage2(item)">
					<view class="g-item">
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>

						<view class="t-box">
							<view class="col-4">
								<text class="title un-clamp">{{item.NAME}}</text>
								<view class="right">
									<text class="price" v-if="!item.MULTIPAY">¥{{item.SALEPRICE}}</text>

									<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
									<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
									<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>

									<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">{{item.MUCHSELLERPRICE}}元</text>
									<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
									<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
									<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
									<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
									<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
									<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
								</view>

							</view>
							<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						</view>
					</view>
				</swiper-item>
			</swiper>
		</view> -->

		<!-- 人气推荐 -->
		
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToRenqituijianPage()">
				<view class="tit-box">
					<text class="tit">人气推荐</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			
			<view class="un-seckill-section" v-if="popularList.length!=0"  >
				<view  v-for="(item, index) in popularList" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<view style="line-height: 40upx;">
								<text class="price" v-if="!item.MULTIPAY">特惠价：¥{{item.SALEPRICE}}</text>
								
								<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
								
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">¥{{item.MUCHSELLERPRICE}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
							</view>
							<text class="tit2 title2">已售{{item.SALECOUNT}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- <view class="new-section m-t">
			<view class="s-header m-t" @click="navToRenqituijianPage()">
				<view class="tit-box">
					<text class="tit">人气推荐</text>
				</view>
				<text class="tit2">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<scroll-view class="floor-list" scroll-x>
				<view class="scoll-wrapper">
					<view v-if="popularList.length===0" class="empty">
						<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
						<view class="empty-tips">暂无数据</view>
					</view>
		
					<view v-else v-for="(item, index) in popularList" :key="index" class="floor-item" @click="navToDetailPage2(item)">
						<view>
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
		
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<text class="price" v-if="!item.MULTIPAY">¥{{item.SALEPRICE}}</text>
		
						<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">{{item.OPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">{{item.OPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">{{item.OPCOUPON}}惠券</text>
		
						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">{{item.MUCHSELLERPRICE}}元</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">{{item.MPPOINT}}积分</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">{{item.MPDEDU}}抵扣券</text>
						<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
						<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">{{item.MPCOUPON}}惠券</text>
					</view>
					<view v-if="popularList.length!==0" class="more" @click="navToRenqituijianPage()">
						<text>查看全部</text>
						<text>More+</text>
					</view>
				</view>
		
			</scroll-view>
		
		</view> -->
		
		<!-- 人气推荐 -->
		<!-- <view class="f-header m-t" @click="navToRenqituijianPage()">
			<view class="tit-box">
				<text class="tit">人气推荐</text>
			</view>
			<text class="tit2">更多推荐</text>
			<text class="iconfont1 iconfont  icon-you1"></text>
		</view> -->
		<!-- 空白页 -->
		<!-- <view v-if="popularList.length==0" class="empty">
			<image src="/static/emptyCart.jpg" mode="aspectFit"></image>
			<view class="empty-tips">暂无数据</view>
		</view>
		<view v-else class="group-section">
			<swiper class="g-swiper" :duration="500">
				<swiper-item class="g-swiper-item" v-for="(item, index) in popularList" :key="index" v-if="index%2 === 0">
					<view class="g-item left" @click="navToDetailPage2(item)">
						<image :src="img+item.THUMB" mode="aspectFill"></image>
						<view class="t-box">
							<text class="title clamp">{{item.NAME}}</text>
							<view class="price-box"> -->
								<!-- <text class="price">￥{{item.SALEPRICE}}</text> -->
								<!-- <text class="price" v-if="!item.MULTIPAY">¥{{item.SALEPRICE}}</text>

								<text class="price" v-if="item.MULTIPAY==2&&item.OPPOINT!=0">积分:{{item.OPPOINT}}</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPDEDU!=0">抵扣券:{{item.OPDEDU}}</text>
								<text class="price" v-if="item.MULTIPAY==2&&item.OPCOUPON!=0">惠券:{{item.OPCOUPON}}</text>

								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0">¥{{item.MUCHSELLERPRICE}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MUCHSELLERPRICE!=0&&item.MPPOINT!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPPOINT!=0">积分:{{item.MPPOINT}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0)&&item.MPDEDU!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPDEDU!=0">抵扣券:{{item.MPDEDU}}</text>
								<text class="price" v-if="item.MULTIPAY==3&&(item.MUCHSELLERPRICE!=0||item.MPPOINT!=0||item.MPDEDU!=0)&&item.MPCOUPON!=0">+</text>
								<text class="price" v-if="item.MULTIPAY==3&&item.MPCOUPON!=0">惠券:{{item.MPCOUPON}}</text>
							</view>
						</view>
					</view>
					<view v-if="popularList[index+1]" class="g-item right" @click="navToDetailPage3(index+1)">
						<image :src="img+popularList[index+1].THUMB" mode="aspectFill"></image>
						<view class="t-box">
							<text class="title clamp">{{popularList[index+1].NAME}}</text>
							<view class="price-box"> -->
								<!-- <text class="price">￥{{popularList[index + 1].SALEPRICE}}</text> -->
								<!-- <text class="price" v-if="!popularList[index + 1].MULTIPAY">¥{{popularList[index + 1].SALEPRICE}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==2&&popularList[index + 1].OPPOINT!=0">积分:{{popularList[index + 1].OPPOINT}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==2&&popularList[index + 1].OPDEDU!=0">抵扣券:{{popularList[index + 1].OPDEDU}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==2&&popularList[index + 1].OPCOUPON!=0">惠券:{{popularList[index + 1].OPCOUPON}}</text>

								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&popularList[index + 1].MUCHSELLERPRICE!=0">¥{{popularList[index + 1].MUCHSELLERPRICE}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&popularList[index + 1].MUCHSELLERPRICE!=0&&popularList[index + 1].MPPOINT!=0">+</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&popularList[index + 1].MPPOINT!=0">积分:{{popularList[index + 1].MPPOINT}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&(popularList[index + 1].MUCHSELLERPRICE!=0||popularList[index + 1].MPPOINT!=0)&&popularList[index + 1].MPDEDU!=0">+</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&popularList[index + 1].MPDEDU!=0">抵扣券:{{popularList[index + 1].MPDEDU}}</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&(popularList[index + 1].MUCHSELLERPRICE!=0||popularList[index + 1].MPPOINT!=0||popularList[index + 1].MPDEDU!=0)&&popularList[index + 1].MPCOUPON!=0">+</text>
								<text class="price" v-if="popularList[index + 1].MULTIPAY==3&&popularList[index + 1].MPCOUPON!=0">惠券:{{popularList[index + 1].MPCOUPON}}</text>
							</view>
						</view>
					</view>
					<view v-else class="g-item right"></view>
				</swiper-item>
			</swiper>
		</view> -->

		<!-- 为你推荐 -->
		<view class="seckill-section m-t">
			<view class="s-header m-t" @click="navToNewproductPage()">
				<view class="tit-box">
					<text class="tit">为你推荐</text>
				</view>
				<text class="tit3">更多推荐</text>
				<text class="iconfont1 iconfont  icon-you1"></text>
			</view>
			<view class="un-seckill-section" v-if="recommend.length!=0">
				<view  v-for="(item, index) in recommend" :key="index" class="guess-item" @click="navToDetailPage2(item)">
					<view style="position: relative;" v-if="index<6" >
						<view class="image-wrapper">
							<image :src="img+item.THUMB" mode="aspectFill"></image>
						</view>
						<text class="title clamp">{{item.NAME}}</text>
						<text class="tit2 title2 clamp">{{item.SHORTINFO}}</text>
						<view style="-webkit-justify-content: space-between;justify-content: space-between;display: flex;">
							<text class="price">￥{{item.SALEPRICE}}</text>
							<text class="un-rentit2 title2">浏览量{{item.BROWSE}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcons from '@/components/uni-icons/uni-icons.vue'
	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue'
	import uniTag from "@/components/uni-tag/uni-tag.vue"
	import uniBadge from '@/components/uni-badge/uni-badge.vue';
	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue'
	export default {
		components: { 
			uniNoticeBar,
			uniTag,
			uniBadge,
			uniIcons,
			uniCountdown
		},
		data() {
			return {
				titleNViewBackground: '',
				swiperCurrent: 0,
				swiperLength: 0,
				carouselList: [],
				goodsList: [],
				brandList: [],
				interval: 5000,
				duration: 500,
				spikeList: [],
				time: 0,
				img: '',
				hour: '',
				minute: '',
				second: '',
				gbList: [],//团购专区
				freshList: [],
				popularList: [],
				popList: [],
				povertyList:[],//扶贫专区商品
				travelList:[],//旅游专区商品
				search: '',
				newsList: [],
				dao:true,
				userid:'',
				recommend:[]
			};
		},

		onLoad(options) {
			// #ifndef MP-WEIXIN
			uni.showLoading({
				title: 'loading'
			})
			// #endif
			
			if(uni.getStorageSync('userInfo')&&uni.getStorageSync('userInfo').USER&&uni.getStorageSync('userInfo').USER.ID){
				this.userid = uni.getStorageSync('userInfo').USER.ID
			}
			if(options.userId!=undefined && options.userId!='undefined'&& options.userId!=''){
				uni.setStorageSync("inviteid",options.userId)
			}
			// #ifdef MP
			uni.showShareMenu()
			 // #endif
			this.img = getApp().globalData.imageAddress
			this.loadTime()
			if(uni.getStorageSync("SIGNATURE")){
				this.loadcarouselList()
				this.loadData()
				this.loadspike()
				this.loadfresh()
				this.loadpopular()
				this.loadpop()
				this.loadcarouselList()
				this.loadnews()
				this.loadpoverty()
				this.loadtravel()
				this.loadgb()
				this.loadRecommend()
			}else{
				uni.request({
					url: getApp().globalData.http+'/common/regist', //仅为示例，并非真实接口地址。
					data: {
						BRAND : this.BRAND,
						MODEL : this.MODEL,
						OS : this.OS,
						OSVERSION: this.OSVERSION,
						SCREEN: this.SCREEN,
						RESOLUTION: this.RESOLUTION,
						MIDU: this.MIDU,
						UQID: this.UQID,
						OSID: this.OSID,
						TVERSION: this.TVERSION,
						TYPE: this.TYPE,//A.Android B.iPhone C.iPad
					},
					method:"POST",
					header: {
						'content-type':'application/x-www-form-urlencoded',
					},
					success: (res) => {
						uni.setStorageSync("SIGNATURE",res.data.OBJECT.SIGNATURE);
						this.loadcarouselList()
						this.loadData()
						this.loadspike()
						this.loadfresh()
						this.loadpopular()
						this.loadpop()
						this.loadcarouselList()
						this.loadnews()
						this.loadpoverty()
						this.loadtravel()
						this.loadgb()
						this.loadRecommend()
					}
				});
			}
			
		},
		onShow() {
			
			if(this.hour==0&&this.minute==0&&this.second==0){
				this.loadTime()
			}
			this.dao=true;
			
			if(!uni.getStorageSync("SIGNATURE")){
				uni.request({
					url: getApp().globalData.http+'/common/regist', //仅为示例，并非真实接口地址。
					data: {
						BRAND : this.BRAND,
						MODEL : this.MODEL,
						OS : this.OS,
						OSVERSION: this.OSVERSION,
						SCREEN: this.SCREEN,
						RESOLUTION: this.RESOLUTION,
						MIDU: this.MIDU,
						UQID: this.UQID,
						OSID: this.OSID,
						TVERSION: this.TVERSION,
						TYPE: this.TYPE,//A.Android B.iPhone C.iPad
					},
					method:"POST",
					header: {
						'content-type':'application/x-www-form-urlencoded',
					},
					success: (res) => {
						uni.setStorageSync("SIGNATURE",res.data.OBJECT.SIGNATURE);
					}
				});
			}
		},
		onUnload() {
			this.dao=false;
		},
		onReady() {
			uni.hideLoading();
		},
		//加载数据以后关闭下拉刷新
		onPullDownRefresh() {
			this.loadData();
		},

		methods: {
			timeup() {
				this.loadTime();
				this.loadspike();
			},

			/**
			 * 请求静态数据只是为了代码不那么乱
			 * 分次请求未作整合
			 */
			async loadData() {
				//关闭下拉刷新
				uni.stopPullDownRefresh();
				uni.hideLoading();
			},
			//加载轮播图
			async loadcarouselList() {
				await this.$http.post("/ad/queryCarousel", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					PAGE: 1, //1查询首页轮播图 2兑换页轮播图
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						this.swiperLength = e.data.OBJECT.length;
						this.titleNViewBackground = e.data.OBJECT[0].BACKGROUND;
						this.carouselList = e.data.OBJECT;
					}
				}).catch((err) => {
					console.log("轮播请求超时", err);
				})
			},
			//加载为你推荐
			async loadRecommend() {
				var userInfo = uni.getStorageSync("userInfo");
				var token = userInfo.TOKEN
				this.$http.post("/user/recommendLogining", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					TOKEN: token
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						this.recommend = e.data.OBJECT
					}else{
						this.$http.post("/user/recommend", {
							SIGNATURE: uni.getStorageSync("SIGNATURE"),
						}).then((res) => {
							if(res.data.STATE==='0' && res.statusCode===200){
								this.recommend = res.data.OBJECT
							}
						}).catch((err) => {
							console.log("为你推荐请求超时", err);
						})
					}
				}).catch((err) => {
					console.log("为你推荐请求超时", err);
				})
				
				
			},
			//加载公告
			async loadnews() {
				//加载信息
				this.$http.post("/ad/querySystemNews", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					TYPE: 1,
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						this.newsList = e.data.OBJECT
						console.log(this.newsList)
					}
				}).catch((err) => {
					console.log("公告请求超时", err);
				})
			},
			//加载秒杀
			async loadspike() {
				//加载信息
				this.$http.post("/goods/spikeList", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						var spikeList = e.data.OBJECT
						this.spikeList = spikeList[this.time * 2].splice(0, 4)
						console.log(this.spikeList)
					}
					
				}).catch((err) => {
					console.log("秒杀请求超时", err);
				})

			},
			//加载团购专区
			async loadgb() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '10',
					TYPE: 1
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						e.data.OBJECT.splice(0, 10).map(item => {
							if (item.ID) {
								this.gbList.push(item)
							}
						})
					}
				}).catch((err) => {
					console.log("综合请求超时", err);
				})
			},
			//加载新鲜好物
			async loadfresh() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '2',
					TYPE: 1
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						e.data.OBJECT.map(item => {
							if (item.ID && this.freshList.length<10) {
								this.freshList.push(item)
							}
						})
					}
					
					console.log(">>>>>>>>>>>>>>>>>>freshList》》》》》",this.freshList);
				}).catch((err) => {
					console.log("综合请求超时", err);
				})
			},
			//加载扶贫专区
			async loadpoverty() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '8',
					TYPE: 1
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						if (e.data.OBJECT) {
							e.data.OBJECT.splice(0, 10).map(item => {
								if (item.ID) {
									this.povertyList.push(item)
								}
							})
						}
					}
					
				}).catch((err) => {
					console.log("扶贫请求超时", err);
				})
			},
			//加载旅游专区
			async loadtravel() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '9',
					TYPE: 1
				}).then((e) => {
					if(e.data.STATE==='0' && e.statusCode===200){
						e.data.OBJECT.splice(0, 10).map(item => {
							if (item.ID) {
								this.travelList.push(item)
							}
						})
					}
					
				}).catch((err) => {
					console.log("旅游请求超时", err);
				})
			},
			//加载人气推荐
			async loadpopular() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '3',
					TYPE: 1
				}).then(e => {
					if(e.data.STATE==='0' && e.statusCode===200){
						e.data.OBJECT.splice(0, 10).map(item => {
							if (item.ID) {
								this.popularList.push(item)
							}
						})
					}
					
				}).catch((err) => {
					console.log("人气请求超时", err);
				})
			},
			//加载专题精选
			async loadpop() {
				//加载信息
				this.$http.post("/goods/fresh", {
					SIGNATURE: uni.getStorageSync("SIGNATURE"),
					GP: '4',
					TYPE: 1
				}).then((e) => {
					// this.popList = e.data.OBJECT.splice(0,1)
					if(e.data.STATE==='0' && e.statusCode===200){
						e.data.OBJECT.splice(0, 10).map(item => {
							if (item.ID) {
								this.popList.push(item)
							}
						})
					}
				}).catch((err) => {
					console.log("专题请求超时", err);
				})
			},
			async loadTime() {
				if (new Date().getHours() % 2 == 0) {
					this.time = new Date().getHours() / 2
				} else {
					this.time = Math.floor(new Date().getHours() / 2)
				}
				var nextT = new Date().getFullYear() + '/' + (new Date().getMonth() + 1) + '/' + new Date().getDate() + ' ' + (this
					.time * 2 + 2) + ':00:00'
				var time1 = new Date(nextT).getTime() - new Date().getTime()
				this.hour = Math.floor(time1 / (1000 * 60 * 60))
				this.minute = Math.floor(time1 % (1000 * 60 * 60) / (1000 * 60))
				this.second = Math.floor(time1 % (1000 * 60 * 60) % (1000 * 60) / 1000)
				console.log(this.hour + ' ' + this.minute + ' ' + this.second)
				if(this.hour==0&&this.minute==0&&this.second==0){
					this.hour=2
				}
			},
			//轮播图切换修改背景色
			swiperChange(e) {
				const index = e.detail.current;
				this.swiperCurrent = index;
				this.titleNViewBackground = this.carouselList[index].BACKGROUND;
			},
			// #ifdef MP
			//跳转到搜索页面
			handleInput (e) {
				this.search = e.detail.value
			},
			navToSearch(){
				uni.navigateTo({
					url: '/pages/search/searchResult/searchResult?item='+this.search
				})
			},
			// #endif
			//轮播图详情页
			navToDetailPage1(item) {
				//#ifdef H5
				window.location.href = item.LINK;
				//#endif
				// #ifdef MP-WEIXIN
				let link=item.LINK.substring(28);
				if(link=="/pages/category/category"||link=="/pages/exchange/exchange"||link=="/pages/cart/cart"||link=="/pages/user/user"){
					uni.switchTab({
						url:link
					})
				}else if(link=="/pages/index/index"||link=="/"){
					uni.switchTab({
						url:"/pages/index/index"
					})
				}else{
					uni.navigateTo({
						url:link
					})
				}
				// #endif
			},
			//秒杀商品详情页
			navToDetailPagespike(item) {
				//测试数据没有写id，用title代替
				console.log("/////////", item)
				let id = item.ID;
				uni.navigateTo({
					url: `/pages/product/product1?id=${id}&spike=1&state=1`
				})
			},
			//跳转团购商品详情页
			navToDetailPageGb(item) {
					let userid;
					if(uni.getStorageSync('userInfo')){
						userid= uni.getStorageSync('userInfo').USER.ID;
					}
					let id = item.ID;
					
					uni.navigateTo({
						url: `/pages/product/productGroup?ID=${id}&userId=${userid}`
					})
			},
			//普通商品详情页
			navToDetailPage(item) {
				let id = item.ID;
				uni.navigateTo({
					url: `/pages/product/product?id=${id}`
				})
			},
			//带兑换商品专题跳转商品详情页
			navToDetailPage2(item) {
				if (item.MULTIPAY) {
					let ids = item.GOODID;
					let sid = item.ID;
					uni.navigateTo({
						url: `/pages/product/productExchange?id=${ids}&sid=${sid}`
					})
				} else {
					let id = item.ID;
					uni.navigateTo({
						url: `/pages/product/product?id=${id}`
					})
				}
			},
			//人气推荐第二个商品  带兑换商品专题跳转商品详情页
			navToDetailPage3(itemIndex) {
				let item=this.popularList[itemIndex];
				if (item.MULTIPAY) {
					let ids = item.GOODID;
					let sid = item.ID;
					uni.navigateTo({
						url: `/pages/product/productExchange?id=${ids}&sid=${sid}`
					})
				} else {
					let id = item.ID;
					uni.navigateTo({
						url: `/pages/product/product?id=${id}`
					})
				}
			},
			
			//跳转团购页面
			navToGroupBuyPage() {
				uni.navigateTo({
					url: '/pagesun/groupbuy/groupbuy'
				});
			},
			//跳转亿拼惠页
			navToYiPinPage() {
				uni.navigateTo({
					url: '/pagesun/yiPin/yiPin'
				});
			},
			//优选推荐页面
			navToBestPage() {
				uni.navigateTo({
					url: '/pagesun/best/best'
				});
			},
			//预购推荐页面
			navToTehuiPage() {
				uni.navigateTo({
					url: '/pagesun/tehui/tehui'
				});
			},
			//专题推荐页面
			navToSpecialPage() {
				uni.navigateTo({
					url: '/pagesun/special1/special1'
				});
			},
			//跳转秒杀页面
			navToSeckillPage() {
				uni.navigateTo({
					url: '/pagesun/seckill/seckill'
				});
			},
			//品牌直供页面
			navToBrandPage() {
				uni.navigateTo({
					url: '/pages/brand/brand'
				});
			},
			//秒杀页面
			navToseckillPage(item) {
				uni.navigateTo({
					url: '/pagesun/seckill/seckill?'
				});
			},
		
			//新鲜好物页面
			navToNewproductPage() {
				uni.navigateTo({
					url: '/pages/newproduct/newproduct'
				});
			},
			//跳转扶贫页面
			navToPovertyPage() {
				uni.navigateTo({
					url: '/pagesun/poverty/poverty'
				});
			},
			//跳转旅游页面
			navToTravelPage() {
				uni.navigateTo({
					url: '/pagesun/travel/travel'
				});
			},
			//人气推荐页面
			navToRenqituijianPage() {
				uni.navigateTo({
					url: '/pages/renqituijina/renqituijian'
				});
			},
			//消息详情页面
			navToNewsDetailPage(item) {
				let id = item.ID;
				uni.navigateTo({
					url: '/pages/news/newsdetail?id=' + id
				});
			},
			
		},
		// #ifndef MP
		// 标题栏input搜索框点击
		onNavigationBarSearchInputClicked: async function(e) {
			this.$api.msg('点击了搜索框');
		},

		onNavigationBarSearchInputChanged(e) {
			this.search = e.text;
		},
		onNavigationBarSearchInputConfirmed() {
			uni.navigateTo({
				url: '/pages/search/searchResult/searchResult?item=' + this.search
			})
		},
		//点击导航栏 buttons 时触发
		onNavigationBarButtonTap(e) {
			const index = e.index;
			if (index === 2) {
				this.$api.msg('点击了扫描');
			} else if (index === 0) {
				// #ifdef APP-PLUS
				const pages = getCurrentPages();
				const page = pages[pages.length - 1];
				const currentWebview = page.$getAppWebview();
				currentWebview.hideTitleNViewButtonRedDot({
					index
				});
				// #endif
				uni.navigateTo({
					url: '/pages/news/newstype'
				})
			} else if (index === 1) {
				uni.navigateTo({
					url: '/pages/search/searchResult/searchResult?item=' + this.search
				})
				//模糊查询所有的商品
				/* navToList(fid,sid, tid,id){
					
					uni.navigateTo({
						url: `/pages/product/list?fid=${fid}&sid=${sid}&tid=${tid}&aid=`+id
					})
					
				} */
			}
		},
		// #endif
		// #ifdef MP
		//小程序分享
		onShareAppMessage(res){
			console.log("首页点击分享",res)
			return {
			      title: "亿拼惠",
			      path: '/pages/index/index?userId='+ this.userid
			}
		},
		 // #endif
	}
</script>

<style lang="scss">
	/* #ifdef MP */
	.mp-search-box {
		position: absolute;
		left: 0;
		top: 10upx;
		z-index: 9999;
		width: 100%;
		padding: 0 80upx;

		.ser-input {
			flex: 1;
			height: 56upx;
			line-height: 56upx;
			text-align: center;
			font-size: 28upx;
			color: $font-color-base;
			border-radius: 20px;
			background: rgba(255, 255, 255, .8);
		}
	}

	page {
		.cate-section {
			position: relative;
			z-index: 5;
			border-radius: 16upx 16upx 0 0;
			margin-top: -20upx;
		}

		// .carousel-section {
		// 	padding: 0;
		// 	width: 100%;
			
		// 	// .titleNview-placing {
		// 	// 	padding-top: 0;
		// 	// 	height: 0;
		// 	// }

		// 	.carousel {
		// 		.carousel-item {
		// 			padding: 0;
		// 		}
		// 	}

		// 	.swiper-dots {
		// 		left: 0upx;
		// 		bottom: 0upx;
		// 	}
		// }
	}

	/* #endif */

	page {
		background: #f5f5f5;
		// background: #ff4e2c;
	}

	.m-t {
		margin-top: 16upx;
	}

	/* 头部 轮播图 */
	.carousel-section {
		position: relative;
		width: 750upx;
		height: 450upx;
		// left: -24upx;
		.carousel{
			height:100%;
		}
		// .carousel-item{
		// 	width: 850upx;
		// }
		// .titleNview-placing {
		// 	height: var(--status-bar-height);
		// 	padding-top: 44px;
		// 	box-sizing: content-box;
		// }

		// .titleNview-background {
		// 	position: absolute;
		// 	bottom: 0;
		// 	left: 0;
		// 	width: 100%;
		// 	/* #ifdef APP-PLUS */
		// 	height: 85%;
		// 	/* #endif */
			
		// 	/* #ifndef APP-PLUS */
		// 	height: 100%;
		// 	/* #endif */
		// 	transition: .4s;
		// }
	}

	//动态文字
	.uni-swiper-msg {
		width: 85%;
		height: 60upx;
		padding: 12rpx 0;
		flex-wrap: nowrap;
		display: flex;
		margin-left: 60upx;
		position: relative;
	}

	.uni-swiper-msg-icon {
		width: 50upx;
		margin-right: 40upx;
		margin-top: 0upx;
	}

	.uni-swiper-msg-icon image {
		width: 80%;
		flex-shrink: 0;
	}

	.uni-swiper-msg swiper {
		width: 90%;
		height: 50upx;
	}

	.uni-swiper-msg swiper-item {
		line-height: 50upx;
	}

	.un-yticon {
		font-size: 35upx;
		margin-bottom: 88upx;
		color: #FF0000;
	}

	.un-gun {
		width: 80%;
		font-size: 30upx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.un-xiang {
		position: absolute;
		right: 0upx;
		top: 5upx;
		width: 44px;
		height: 45upx;
		background: inherit;
		background-color: rgba(255, 255, 255, 0);
		box-sizing: border-box;
		border-width: 1px;
		border-style: solid;
		border-color: #E02E24;
		border-radius: 3px;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		font-family: '微软雅黑';
		font-weight: 404;
		font-style: normal;
		font-size: 11px;
		color: #E02E24;
		text-align: center;
		line-height: 40upx;
	}

	// 品牌分类
	// .brand-section {
	// 	display: flex;
	// 	flex-wrap: wrap;
	// 	padding: 0 50upx;
	// 	background: #fff;

	// 	.guess-item {
	// 		position: relative;
	// 		width: 48%;
	// 		padding-bottom: 40upx;
			
	// 		&:nth-child(2n+1) {
	// 			margin-right: 4%;
	// 		}

	// 		.price {
	// 			margin-top: 20upx;
	// 			padding-bottom: 10upx;
	// 		}

	// 		.biaoqian {
	// 			margin-left: 130upx;
	// 			margin-bottom: 10upx;
	// 		}

	// 		.un-huangtuoyuan {
	// 			z-index: 1;
	// 			position: absolute;
	// 			margin-left: 240upx;
	// 			top: 48upx;
	// 			width: 79upx;
	// 			height: 35upx;
	// 			background: inherit;
	// 			background-color: rgba(241, 151, 54, 1);
	// 			box-sizing: border-box;
	// 			border-width: 1upx;
	// 			border-style: solid;
	// 			border-color: rgba(241, 151, 54, 1);
	// 			border-radius: 42upx;
	// 			border-bottom-left-radius: 0upx;
	// 			-moz-box-shadow: none;
	// 			-webkit-box-shadow: none;
	// 			box-shadow: none;
	// 			font-family: '微软雅黑';
	// 			font-weight: 404;
	// 			font-style: normal;
	// 			font-size: 22upx;
	// 			color: #FFFFFF;
	// 			text-align: center;
	// 			line-height: 31upx
	// 		}
	// 	}

	// 	.image-wrapper {
	// 		margin-top: 20upx;
	// 		width: 300upx;
	// 		height: 150upx;
	// 		border-radius: 3px;
	// 		overflow: hidden;

	// 		image {
	// 			width: 100%;
	// 			height: 100%;
	// 			opacity: 1;
	// 		}
	// 	}

	// 	.title {
	// 		font-size: 32upx;
	// 		color: $font-color-dark;
	// 		line-height: 40upx;
	// 	}

	// 	.title2 {
	// 		font-size: 24upx;
	// 		line-height: 40upx;
	// 	}

	// 	.price {
	// 		font-size: 28upx;
	// 		color: #9D9D9D;
	// 		line-height: 30upx;
	// 	}

	// 	.tit2 {
	// 		font-size: $font-sm;
	// 		color: $font-color-light;
	// 	}

	// }

	.carousel {
		width: 100%;
		height: 350upx;

		.carousel-item {
			width: 100%;
			height: 100%;
			overflow: hidden;
		}

		image {
			width: 100%;
			height: 100%;
			border-radius: 10upx;
		}
	}

	.swiper-dots {
		display: flex;
		position: absolute;
		left: 60upx;
		bottom: 15upx;
		width: 72upx;
		height: 36upx;
		background-image: url();
		background-size: 100% 100%;

		.num {
			width: 36upx;
			height: 36upx;
			border-radius: 50px;
			font-size: 24upx;
			color: #fff;
			text-align: center;
			line-height: 36upx;
		}

		.sign {
			position: absolute;
			top: 0;
			left: 50%;
			line-height: 36upx;
			font-size: 12upx;
			color: #fff;
			transform: translateX(-50%);
		}
	}

	/* 分类 */
	.cate-section1 {
		display: flex;
		justify-content: space-around;
		align-items: center;
		flex-wrap: wrap;
		padding: 40upx 22upx;
		background: #fff;
		// background: #ff4e2c;
		.cate-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			font-weight: 900;
			font-size: $font-sm +8upx;
			// font-weight: 900;
			color: #666666;
		}

		/* 原图标颜色太深,不想改图了,所以加了透明度 */
		image {
			width: 60upx;
			height: 60upx;
			margin-bottom: 14upx;
		}
	}

	.cate-section {
		display: flex;
		justify-content: space-around;
		align-items: center;
		flex-wrap: wrap;
		padding: 30upx 22upx;
		background: #fff;

		.cate-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			font-size: $font-sm + 5upx;
			color: $font-color-dark;
		}

		/* 原图标颜色太深,不想改图了,所以加了透明度 */
		image {
			width: 88upx;
			height: 88upx;
			margin-bottom: 14upx;
			border-radius: 50%;
			opacity: .7;
			box-shadow: 4upx 4upx 20upx rgba(250, 67, 106, 0.3);
		}
	}

	.ad-1 {
		width: 100%;
		height: 210upx;
		padding: 10upx 0;
		background: #fff;

		image {
			width: 100%;
			height: 100%;
		}
	}
	.s-header {
		display: flex;
		align-items: center;
		height: 40upx;
		line-height: 1;
		margin-bottom:15upx;
		padding-left:30upx;
		.s-img {
			width: 140upx;
			height: 30upx;
		}

		.tip {
			font-size: $font-base ;
			color: $font-color-light;
			margin: 0 20upx 0 40upx;
		}

		.timer {
			display: inline-block;
			width: 40upx;
			height: 36upx;
			text-align: center;
			line-height: 36upx;
			margin-right: 14upx;
			font-size: $font-sm+2upx;
			color: #fff;
			border-radius: 2px;
			background: rgba(0, 0, 0, .8);
		}

		.icon-you {
			font-size: $font-lg;
			color: $font-color-light;
			flex: 1;
			text-align: right;
		}

		.tit-box {
			flex: 1;
			display: flex;
			flex-direction: column;
		}

		.tit {
			font-weight: 900;
			font-size: $font-sm +6upx;
			color: $font-color-dark;
			line-height: 1.3;
		}
		.tit2 {
			font-weight: 900;
			font-size: $font-sm +6upx;
			color: $font-color-light;
		}
		.tit3 {
			font-weight: 900;
			margin-left: 390upx;
			font-size: $font-sm +6upx;
			color: $font-color-light;
		}

		.un-you {
			padding-left: 360upx;
		}

		.un-you2 {
			padding-left: 210upx;

		}

	}
	/* 秒杀专区 */
	.seckill-section {
		display: flex;
		flex-wrap: wrap;
		background: #FFF;
		margin: 20upx 15upx;
		border-top: 1upx solid #DEE4E4  ;
		border-right: 1upx solid #DEE4E4  ;
		border-left: 1upx solid #DEE4E4  ;
		border-radius: 3%;
		font-size: 50upx;
		.un-seckill-section {
			display: flex;
			flex-wrap: wrap;
			background: #F5F5F5;
			.guess-item {
				width: 345upx;
				background: #fff;
				margin-left: 10upx;
				margin-top:10upx;
				
				border-radius:5%;
				&:nth-child(2n+1){
					// margin-right: 13upx;
				}
				.image-wrapper {
					// margin-top: 10upx;
					// margin-left: 5upx;
					width: 340upx;
					height: 370upx;
					
					border-radius: 3px;
					overflow: hidden;
					image {
						width: 100%;
						height: 100%;
						opacity: 1;
					}
				}

				// .un-hongyuan {
					// z-index: 1;
					// position: absolute;
					// margin-left: 205upx;
					// top: -30upx;
					// width: 80upx;
					// height: 80upx;
					// background: inherit;
					// background-color: rgba(240, 72, 68, 1);
					// border: none;
					// border-radius: 58upx;
					// -moz-box-shadow: none;
					// -webkit-box-shadow: none;
					// box-shadow: none;
					// font-family: '微软雅黑';
					// font-style: normal;
					// color: #FFFFFF;
					// line-height: 60upx;

					// .m-price {
					// 	font-size: 20upx;
					// 	text-decoration: line-through;
					// }
				// }
				
				.title {
					margin: 10upx 20upx  0upx 0upx;
					font-size: 30upx;
					color: $font-color-dark;
					// line-height: 40upx;
					font-weight: 900;
				}
				
				.title2 {
					// margin: 0 30upx;
					// line-height: 50upx;
					font-size: $font-sm;
					color: $font-color-light;
					line-height: 50upx;
				}

				// .tit2 {
				// 	font-size: $font-sm;
				// 	color: $font-color-light;
				// }

				
				.m-price {
					font-size: 20upx;
					text-decoration: line-through;
					color: #666666;
					.price-a{
						font-size: 5upx;
					}
				}
				.price {
					color: $uni-color-primary;
					font-size: 30upx;
					padding-bottom: 10upx;
				}
			}
		}

	}

	/* 新鲜好物 */
	// .new-section {
	// 	padding: 5upx 50upx 24upx;
	// 	background: #fff;
	// 	.s-header {
	// 		display: flex;
	// 		align-items: center;
	// 		height: 92upx;
	// 		line-height: 1;
	// 		margin-left:-40upx;
	// 		.s-img {
	// 			width: 140upx;
	// 			height: 30upx;
	// 		}

	// 		.tip {
	// 			font-size: $font-base;
	// 			color: $font-color-light;
	// 			margin: 0 20upx 0 40upx;
	// 		}

	// 		.icon-you {
	// 			font-size: $font-lg;
	// 			color: $font-color-light;
	// 			flex: 1;
	// 			text-align: right;
	// 		}

	// 		.tit-box {
	// 			flex: 1;
	// 			display: flex;
	// 			flex-direction: column;
	// 		}

	// 		.tit {
	// 			font-size: $font-sm +2upx;
	// 			color: $font-color-dark;
	// 			line-height: 1.3;

	// 		}

	// 		.tit2 {
	// 			font-size: $font-sm;
	// 			color: $font-color-light;

	// 		}

	// 	}

	// 	.floor-list {
	// 		white-space: nowrap;
	// 		margin-top: 20upx;
	// 	}

	// 	.scoll-wrapper {
	// 		display: flex;
	// 		align-items: flex-start;
	// 	}

	// 	.floor-item {
	// 		width: 250upx;
	// 		margin-right: 20upx;
	// 		font-size: $font-sm+2upx;
	// 		color: $font-color-dark;
	// 		line-height: 1.8;

	// 		image {
	// 			margin-top: 15upx;
	// 			width: 160upx;
	// 			height: 160upx;
	// 			border-radius: 6upx;
	// 		}

	// 		.price {
	// 			color: $uni-color-primary;
	// 		}

	// 		.title {
	// 			width: 250upx;
	// 		}

	// 		.tit2 {
	// 			font-size: $font-sm;
	// 			color: $font-color-light;
	// 		}

	// 		.title2 {
	// 			font-size: 25upx;
	// 			line-height: 40upx;
	// 			width: 250upx;
	// 		}

	// 		.un-huangtuoyuan {
	// 			z-index: 1;
	// 			position: absolute;
	// 			margin-left: 68px;
	// 			top: 0upx;
	// 			width: 79upx;
	// 			height: 35upx;
	// 			background: inherit;
	// 			background-color: rgba(241, 151, 54, 1);
	// 			box-sizing: border-box;
	// 			border-width: 1upx;
	// 			border-style: solid;
	// 			border-color: rgba(241, 151, 54, 1);
	// 			border-radius: 42upx;
	// 			border-bottom-left-radius: 0upx;
	// 			-moz-box-shadow: none;
	// 			-webkit-box-shadow: none;
	// 			box-shadow: none;
	// 			font-family: '微软雅黑';
	// 			font-weight: 404;
	// 			font-style: normal;
	// 			font-size: 22upx;
	// 			color: #FFFFFF;
	// 			text-align: center;
	// 			line-height: 31upx
	// 		}

	// 	}

	// 	.more {
	// 		display: flex;
	// 		align-items: center;
	// 		justify-content: center;
	// 		flex-direction: column;
	// 		flex-shrink: 0;
	// 		width: 180upx;
	// 		height: 180upx;
	// 		border-radius: 6upx;
	// 		background: #f3f3f3;
	// 		font-size: $font-base;
	// 		color: $font-color-light;

	// 		text:first-child {
	// 			margin-bottom: 4upx;
	// 		}
	// 	}
	// }

	.f-header {
		display: flex;
		align-items: center;
		height: 110upx;
		padding: 6upx 50upx 8upx;
		background: #fff;
		image {
			flex-shrink: 0;
			width: 80upx;
			height: 80upx;
			margin-right: 20upx;
		}

		.tit-box {
			flex: 1;
			display: flex;
			flex-direction: column;
		}

		.tit {
			font-size: $font-base;
			color: $font-color-dark;
			line-height: 1.3;
		}

		.tit2 {
			font-size: $font-sm;
			color: $font-color-light;
		}

		.icon-you {
			font-size: $font-lg +2upx;
			color: $font-color-light;
		}

	}

	.empty {
		width: 100%;
		padding-bottom: 50upx;
		display: flex;
		justify-content: center;
		flex-direction: column;
		align-items: center;
		background: #fff;
		image {
			width: 240upx;
			height: 160upx;
			margin-bottom: 30upx;
		}

		.empty-tips {
			font-size: $font-sm+2upx;
			color: $font-color-disabled;
		}
	}

	/* 人气推荐 */
	// .group-section {
	// 	padding: 0upx 50upx;
	// 	background: #fff;
	// 	.g-swiper {
	// 		height: 650upx;
	// 		padding-bottom: 30upx;
	// 	}

	// 	.g-swiper-item {
	// 		width: 100%;
	// 		padding: 0upx;
	// 		display: flex;
	// 	}

	// 	image {
	// 		width: 100%;
	// 		height: 520upx;
	// 		border-radius: 4px;
	// 	}

	// 	.g-item {
	// 		display: flex;
	// 		flex-direction: column;
	// 		overflow: hidden;
	// 	}

	// 	.left {
	// 		flex: 1.2;
	// 		margin-right: 25upx;

	// 		.t-box {
	// 			padding-top: 20upx;
	// 		}
	// 	}

	// 	.right {
	// 		flex: 0.8;
	// 		flex-direction: column-reverse;

	// 		.t-box {
	// 			padding-bottom: 20upx;
	// 		}
	// 	}

	// 	.t-box {

	// 		font-size: 25upx;
	// 		color: $font-color-dark;
	// 		line-height: 1.6;
	// 	}

	// 	.price {
	// 		color: $uni-color-primary;
	// 	}

	// 	.m-price {
	// 		font-size: $font-sm+2upx;
	// 		text-decoration: line-through;
	// 		color: $font-color-light;
	// 		margin-left: 8upx;
	// 	}

	// 	.pro-box {
	// 		display: flex;
	// 		align-items: center;
	// 		margin-top: 10upx;
	// 		font-size: $font-sm;
	// 		color: $font-base;
	// 		padding-right: 10upx;
	// 	}

	// 	.progress-box {
	// 		flex: 1;
	// 		border-radius: 10px;
	// 		overflow: hidden;
	// 		margin-right: 8upx;
	// 	}
	// }


	/* 专题精选 */
	// .zhuan-section {
	// 	background: #fff;
	// 	padding: 0upx 50upx;
	// 	margin-top:150upx;
	// 	.g-swiper {
	// 		height: 460upx;
	// 		padding-bottom: 30upx;
	// 	}

	// 	.g-swiper-item {
	// 		width: 100%;
	// 		padding: 0upx;
	// 		display: flex;

	// 		.g-item {
	// 			width: 100%;
	// 			display: flex;
	// 			flex-direction: column;
	// 			overflow: hidden;

	// 			.image-wrapper {
	// 				width: 100%;
	// 				height: 100%;
	// 				border-radius: 4px;
	// 				overflow: hidden;
	// 				text-align: center;
	// 				background-color: #FFFFFF;

	// 				image {
	// 					height: 100%;
	// 					width: 100%;
	// 					opacity: 1;
	// 				}
	// 			}
	// 		}
	// 	}

	// 	.un-clamp {
	// 		overflow: hidden;
	// 		text-overflow: ellipsis;
	// 		white-space: nowrap;
	// 	}

	// 	.left {
	// 		flex: 1.2;
	// 		margin-right: 24upx;

	// 		.t-box {
	// 			padding-top: 20upx;
	// 		}
	// 	}

	// 	.right {
	// 		flex: 0.8;
	// 		flex-direction: column-reverse;
	// 		padding-right: 10upx;
	// 		float: right;
	// 	}

	// 	.t-box {
	// 		width: 100%;
	// 		font-size: $font-base;
	// 		color: $font-color-dark;
	// 		line-height: 1;
	// 	}

	// 	.col-4 {
	// 		width: 100%;
	// 		height: 80upx;
	// 		line-height: 80upx;
	// 		box-sizing: border-box;
	// 		/*怪异盒子模型*/
	// 	}

	// 	.tit2 {
	// 		width: 100%;
	// 		font-size: $font-sm;
	// 		color: $font-color-light;
	// 	}

	// 	.price {
	// 		color: $uni-color-primary;
	// 	}

	// 	.m-price {
	// 		font-size: $font-sm+2upx;
	// 		text-decoration: line-through;
	// 		color: $font-color-light;
	// 		margin-left: 8upx;
	// 	}

	// 	.pro-box {
	// 		display: flex;
	// 		align-items: center;
	// 		margin-top: 10upx;
	// 		font-size: $font-sm;
	// 		color: $font-base;
	// 		padding-right: 10upx;
	// 	}

	// 	.progress-box {
	// 		flex: 1;
	// 		border-radius: 10px;
	// 		overflow: hidden;
	// 		margin-right: 8upx;
	// 	}
	// }

	/* 为你推荐 */
	.guess-section {
		display: flex;
		flex-wrap: wrap;
		padding: 0 50upx;
		background: #fff;

		.guess-item {

			display: flex;
			flex-direction: column;
			width: 45%;
			padding-bottom: 40upx;

			&:nth-child(2n+1) {
				margin-right: 4%;
			}
		}

		.image-wrapper {
			margin-left: 85upx;
			width: 260upx;
			height: 260upx;
			border-radius: 3px;
			overflow: hidden;

			image {
				width: 200;
				height: 200;
				opacity: 1;
			}
		}

		.title {
			margin-left: 40upx;
			font-size: $font-sm+1upx;
			color: $font-color-dark;
			line-height: 60upx;
			text-align: center;
		}

		.price {
			margin-left: 115upx;
			font-size: $font-sm;
			color: $uni-color-primary;
			line-height: 1;
			line-height: 50upx;
		}

		.tit2 {
			margin-left: 40upx;
			font-size: $font-sm;
			color: $font-color-light;
			line-height: 30upx;
			text-align: center;
		}
	}

	.iconfont1 {
		margin-left: 8upx;
		color: $font-color-light;
		font-weight: 900;
		font-size: 27upx;
	}
</style>
